import axios from '@/utils/axios/http'

/**
 * 保存订单
 */
export function saveOrder(data) {
  return axios({
    url: '/order/save',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}

/**
 * 查询当前订单
 */
export function searchCurrentOrder(data) {
  return axios({
    url: '/order/searchCurrent',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}

/**
 * 查询商家所有订单
 */
export function searchSellerAllOrder(data) {
  return axios({
    url: '/order/searchSellerAllOrder',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}

/**
 * 查询用户所有订单
 */
export function searchAllOrder(data) {
  return axios({
    url: '/order/searchAllOrder',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}

/**
 * 取消订单
 */
export function cancelOrder(data) {
  return axios({
    url: '/order/cancelOrder',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}

/**
 * 更新订单
 */
export function updateOrder(data) {
  return axios({
    url: '/order/updateOrder',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}

/**
 * 重新打开订单
 */
export function openAgain(data) {
  return axios({
    url: '/order/openAgain',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}

/**
 * 支付订单
 */
export function payOrder(data) {
  return axios({
    url: '/order/payOrder',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}

/**
 * 出餐
 */
export function sendFood(data) {
  return axios({
    url: '/order/sendFood',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}

/**
 * 取餐
 */
export function receiveFood(data) {
  return axios({
    url: '/order/receiveFood',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}